#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
void left(int* arr, int n, int sz)
{
	while (n--)
	{
		int i = 0;
		int a = arr[0];
		int b = n;
		for (i = 1; i < sz; i++)
		{
			arr[i - 1] = arr[i];
		}
		arr[sz - 1] = a;
	}
}
int main()
{
	int arr[5] = { 1,2,3,4,5 };
	int n = 0;
	int sz = sizeof(arr) / sizeof(arr[0]);
	scanf("%d", &n);
	left(arr, n, sz);
	int j = 0;
	for (j = 0; j < 5; j++)
		printf("%d", arr[j]);
	return 0;
}